<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
  <title>Document</title>
  <style type="text/css">
    *{
      margin: 0;
      padding: 0;
    }
    .nav {
      width: 960px;
      height: 50px;
      border: 1px solid red;
      /*左右居中*/
      margin: 100px auto;
    }
    .nav ul{
      /*去掉小圆点*/
      list-style: none;
    }
    .nav ul li{
      float: left;
      width: 120px;
      height: 50px;
      /*让内容水平居中*/
      text-align: center;
      /*让行高等于nav的高度，就可以保证内容垂直居中*/
      line-height: 50px;
    }
    .nav ul li a{
      display: block;
      width: 120px;
      height: 50px;
    }
    /*两个伪类的属性，可以用逗号隔开*/
    .nav ul li a:link , .nav ul li a:visited{
      text-decoration: none;
      background-color: purple;
      color:white;
    }
    .nav ul li a:hover{
      background-color: orange;
    }

    .test-focus{
      width: 960px;
      height: 50px;
      border: 1px solid red;
      margin: 100px auto;
    }

    .test-focus:hover{
      background-color: red;
    }

    .test-table{
      width: 960px;
      height: 200px;
      border: 1px solid red;
      margin: 100px auto;
    }

    /*整个表格的样式*/
    table{
      width: 300px;
      height: 200px;
      border: 1px solid blue;
      /*border-collapse属性：对表格的线进行折叠*/
      border-collapse: collapse;
    }

    /*鼠标悬停时，让当前行显示#868686这种灰色*/
    table tr:hover{
      background: #868686;
    }

    /*每个单元格的样式*/
    table td{
      border:1px solid red;
    }
  </style>
</head>
<body>
<div class="nav">
  <ul>
    <li><a href="#">网站栏目</a></li>
    <li><a href="#">网站栏目</a></li>
    <li><a href="#">网站栏目</a></li>
    <li><a href="#">网站栏目</a></li>
    <li><a href="#">网站栏目</a></li>
    <li><a href="#">网站栏目</a></li>
    <li><a href="#">网站栏目</a></li>
    <li><a href="#">网站栏目</a></li>
  </ul>
</div>

<div class="test-focus">
  abdcjd
</div>

<div class="test-table">
  <table>
    <tr>
      <td></td>
      <td></td>
      <td></td>
      <td></td>
    </tr>
    <tr>
      <td></td>
      <td></td>
      <td></td>
      <td></td>
    </tr>
    <tr>
      <td></td>
      <td></td>
      <td></td>
      <td></td>
    </tr>
  </table>
</div>
</body>
</html>
